Skip to content

Conversation

@kuzmany
Copy link
Member

@kuzmany kuzmany commented May 30, 2025

Description

This PR adds documentation for the new < /dev/null | label modifier that allows displaying human-readable labels for select and boolean contact fields instead of their stored values.

Changes

  • Added new "Token modifiers" section in /docs/configuration/variables.rst explaining the label modifier syntax
  • Added subsection in /docs/channels/emails.rst under Tokens section with examples
  • Included examples for both contact and company fields

Examples documented

  • Contact select field: {contactfield=select_alias|label}
  • Contact boolean field: {contactfield=bool_alias|label}
  • Company select field: {contactfield=company_select_alias|label}
  • Company boolean field: {contactfield=company_bool_alias|label}

Related PR

Related to mautic/mautic#12620

@kuzmany kuzmany changed the base branch from main to 5.x May 30, 2025 11:10
@kuzmany kuzmany force-pushed the update-contactfield-token-label-docs branch from e628de3 to 2f0251c Compare May 30, 2025 11:11
Add documentation for the new  < /dev/null | label modifier that displays human-readable labels for select and boolean contact fields instead of stored values.

Related to mautic/mautic#12620
@kuzmany kuzmany force-pushed the update-contactfield-token-label-docs branch from 2f0251c to e99ebb7 Compare May 30, 2025 11:22
@RCheesley RCheesley requested review from a team, adiati98 and favour-chibueze and removed request for a team November 4, 2025 13:59
Copy link
Member

@RCheesley RCheesley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small tweaks here @kuzmany but more importantly, it needs rebasing to the 7.0 branch please!

- A country select field storing ``us`` can display ``United States``
- A boolean field storing ``1`` can display ``Yes``

The modifier also works with company fields:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The modifier also works with company fields:
The modifier also works with Company fields:


This modifier works for both Contact fields and Company fields:

- ``{contactfield=company_type|label}`` - displays the label of a company select field
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``{contactfield=company_type|label}`` - displays the label of a company select field
- ``{contactfield=company_type|label}`` - displays the label of a Company select field

This modifier works for both Contact fields and Company fields:

- ``{contactfield=company_type|label}`` - displays the label of a company select field
- ``{contactfield=company_active|label}`` - displays the label of a company boolean field
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``{contactfield=company_active|label}`` - displays the label of a company boolean field
- ``{contactfield=company_active|label}`` - displays the label of a Company boolean field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants